package com.teacherprofile.common.domain;

import java.math.BigDecimal;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.teacherprofile.common.converters.DateConverter;
import com.teacherprofile.common.converters.technical_services.TechnicalServicesConverter;
import com.teacherprofile.common.core.domain.BaseEntity;
import lombok.Data;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadFontStyle;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;

/**
 * 课题项目对象 tb_technical_services
 *
 * @author vibelin
 * @date 2025-05-17
 */
@Data
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
@ExcelIgnoreUnannotated
@ColumnWidth(22)
@HeadRowHeight(16)
@HeadFontStyle(fontHeightInPoints = 12)
@TableName("tb_technical_services")
public class TechnicalServices extends BaseEntity {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    /** 主键 */
    private Long id;

    /**
     * 教职工号
     */
    @ExcelProperty(value = "教职工号", index = 2)
    private String userName;

    /**
     * 姓名
     */
    @ExcelProperty(value = "姓名", index = 1)
    private String nickName;

    /**
     * 项目名称
     */
    @ExcelProperty(value = "项目名称", index = 0)
    private String projectName;

    /**
     * 技术服务单位
     */
    @ExcelProperty(value = "技术服务单位", index = 6)
    private String serviceUnit;

    /**
     * 项目经费
     */
    @ExcelProperty(value = "项目经费", index = 7)
    private BigDecimal projectFunding;

    /**
     * 起止时间(yyyy-mm-dd至yyyy-mm-dd)
     */
    @ExcelProperty("起止时间")
    private String beginningEndingTime;

    /**
     * 项目性质
     */
    @ExcelProperty(value = "项目性质", index = 4)
    private String projectNature;

    /**
     * 项目来源
     */
    @ExcelProperty(value = "项目来源", index = 5)
    private String projectSource;

    /**
     * 项目类别(0：课题项目，1：纵向科研)
     */
    @ExcelProperty(value = "项目类别", converter = TechnicalServicesConverter.class, index = 8)
    private Integer projectType;

    /**
     * 主要参与人列表(逗号分隔)
     */
    @ExcelProperty(value = "主要参与人列表", index = 3)
    private String participants;

    /**
     * 扫描件URL
     */
    @ExcelProperty(value = "扫描件URL", index = 11)
    private String scannedDocumentsUrl;

    /**
     * 起始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ExcelProperty(value = "起始时间", converter = DateConverter.class, index = 9)
    private Date startTime;

    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ExcelProperty(value = "结束时间", converter = DateConverter.class, index = 10)
    private Date endTime;
}
